<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>

<div class="t_bar">
        <span class="color_red">*</span>入驻创业团队或初创期小微企业汇总表
    </div>
    <table  id="eq_table3" cellpadding="0" class="t_css table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
               
           <thead >
                   <tr style="border:1px solid #B7D1E6">
                       <th class="TblHead" align="center" style="width: 5%">选择</th>
                       <th class="TblHead" align="center" style="width: 5%">序号</th>
                       <th class="TblHead" align="center" style="width: 17%">团队（小微企业）名称</th>
                       <th class="TblHead" align="center" style="width: 20%">成立时间</th>
                       <th class="TblHead" align="center" style="width: 20%">入驻时间</th>
                       <th class="TblHead" align="center" style="width: 17%">技术领域</th>
                       <th class="TblHead" align="center" style="width: 10%">使用场地面积<br>（平米）</th>
                       <th class="TblHead" align="center" style="width: 6%">团队成员数</th>
                   </tr>
           </thead>
           <tbody id="tab">
                   <tr style="display:none;">
                       <td align="center">
                           <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selMileStones" >
                       </td>
                       <td align="center">
                           <span name="company_teams|company_team[0]@seq_no" >[index]</span> 
                       </td>
                       <td align="center">
                           <input name="company_teams|company_team[0]|basic_info|team_name" style="width: 80%" label="团队（小微企业）名称" type="text" required class="input_text required" value="" maxlength="20"/>
                       </td>
                       <td align="center">
                           <cpt:date id="establishment_time[index]" name="company_teams|company_team[0]|basic_info|establishment_time" value="" className="required date" label="成立时间"></cpt:date> 
                       </td>
                       <td align="center">
                           <cpt:date id="enter_time[index]" name="company_teams|company_team[0]|basic_info|enter_time" value="" className="required date" label="入驻时间"></cpt:date> 
                       </td>
                       <td align="center">
                           <input name="company_teams|company_team[0]|basic_info|technical_field" style="width: 80%" label="技术领域" type="text" required class="input_text required" value="" maxlength="50"/>
                       </td>
                       <td align="center">
                           <input name="company_teams|company_team[0]|basic_info|use_site_area" style="width: 60%;text-align: right;" label="使用场地面积" onfocus="InitInput.setNumber(this,9,2,2)" type="text" required class="input_text required" value=""/>
                       </td>
                       <td align="center">
                           <input name="company_teams|company_team[0]|basic_info|team_member_numbers" style="width: 60%;text-align: right;" label="团队成员数" onfocus="InitInput.setNumber(this,9,0,0)" type="text" required class="input_text required" value=""/>
                       </td>
                   </tr>
                   
                   
                   <c:set value="0" var="index" scope="page"/>
                   <x:forEach select="$xmlData/data/company_teams/company_team" var="company_team">
                   
                   <c:choose>
                       <c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
                       <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
                   </c:choose>
                   <tr >
                       <td align="center">
                           <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selMileStones" >
                       </td>
                       <td align="center">
                           <span name="company_teams/company_team[${flag}${index}]@seq_no"><x:out select="$company_team/@seq_no"/></span> 
                       </td>
                       <td align="center">
                           <input name="company_teams/company_team[${flag}${index}]/basic_info/team_name" label="团队（小微企业）名称" style="width: 80%" type="text" required class="input_text required" value="<x:out select="$company_team/basic_info/team_name"/>" maxlength="20"/>
                       </td>
                       <td align="center">
                           <c:set var="establishment_time"><x:out select="$company_team/basic_info/establishment_time" /></c:set>
                           <cpt:date id="establishment_time${index}" name="company_teams/company_team[${flag}${index}]/basic_info/establishment_time" value="${establishment_time}" className="required date" label="成立时间"></cpt:date>
                       </td>
                       <td align="center">
                           <c:set var="enter_time"><x:out select="$company_team/basic_info/enter_time" /></c:set>
                           <cpt:date id="enter_time${index}" name="company_teams/company_team[${flag}${index}]/basic_info/enter_time" value="${enter_time}" className="required date" label="入驻时间"></cpt:date>
                       </td>
                       <td align="center">
                           <input name="company_teams/company_team[${flag}${index}]/basic_info/technical_field" label="技术领域" style="width: 80%" type="text" required class="input_text required" value="<x:out select="$company_team/basic_info/technical_field"/>" maxlength="50"/>
                       </td>
                       <td align="center">
                           <input name="company_teams/company_team[${flag}${index}]/basic_info/use_site_area" style="width: 60%;text-align: right;" label="使用场地面积" onfocus="InitInput.setNumber(this,9,2,2)" type="text" required class="input_text required" value="<x:out select="$company_team/basic_info/use_site_area"/>"/>
                       </td>
                       <td align="center">
                           <input name="company_teams/company_team[${flag}${index}]/basic_info/team_member_numbers" style="width: 60%;text-align: right;" label="团队成员数" onfocus="InitInput.setNumber(this,9,0,0)" type="text" required class="input_text required" value="<x:out select="$company_team/basic_info/team_member_numbers"/>"/>
                       </td>
                   </tr>
                   <c:set value="${index+1}" var="index" scope="page"/>
                   <script type="text/javascript">
                       showAllDateTag("eq_table3");
                   </script>
                   </x:forEach>
               </tbody>
       </table>
       <table width="98%" align="center">
               <tr >
                   <td>
                       <input class="button_02" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('eq_table3',999,'入驻创业团队或初创期小微企业汇总表内容最多只能填写999条')){addNewRow('eq_table3');showDateTag('eq_table3');}try{top.resizeFrame();}catch(e){};">
                       <input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('eq_table3','selMileStones');">
                       <input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('eq_table3','selMileStones');">
                       <input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('eq_table3','入驻创业团队或初创期小微企业汇总表');">
                   </td>
               </tr>
       </table>
<script>
function initControlValue(objId){
    
    var name="";
    var obj=$("#"+objId);
    if(obj.is("select")){
        name=obj.attr("name");
        obj.parent().children("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).find("option:selected").val());
        $("#"+objId).parent().children("input[name$='"+name+"_name']").val($("#"+objId).find("option:selected").text());
    }
   
    else if(obj.is(":radio")){
        name=obj.attr("name");
        if(obj.is(":checked")){//如果被选中
            //alert($("#"+objId).val());        
            obj.parents("table").find("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).val());
            $("#"+objId).parent().children("input[name$='"+name+"_name']").val($("#"+objId).next().text());
        }
        else{
            
            obj.parents("table").find("input[name$='"+name+"_value'][type='hidden']").val("");
        }
    }else if(obj.is(":checkbox")){
        name=obj.attr("name");
        if(obj.is(":checked"))//如果被选中
            obj.parent().find("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).val());
        else
            obj.parent().find("input[name$='"+name+"_value'][type='hidden']").val("");
    }else{
        name=obj.attr("id");
        obj.parents("td").find("input[name$='"+name+"_name'][type='hidden']").val(obj.val());
        obj.parents("td").find("input[name$='"+name+"_code'][type='hidden']").val($("#"+objId+"_hideId").val());
    }   
}
</script>
